# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pypsrp
_pkgname=pypsrp
pkgver=0.8.1
pkgrel=6
epoch=1
pkgdesc='PowerShell Remoting Protocol for Python.'
arch=('any')
url='https://github.com/jborean93/pypsrp'
license=('MIT')
depends=('python' 'krb5' 'python-cryptography' 'python-requests'
         'python-pyspnego' 'python-psrpcore' 'python-httpx'
         'python-gssapi' 'python-psutil')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c0aeec5060aaa218424bf30fa7dca95a1fb8bc41b4beb42c0d8b03bd44bad6b91e44a5dd12083b0ac37462902ef5ab3977dd9c7567924f318e4e38d542421534')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    "$_pkgname"
}

